<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title></title>
</head>
<body>
<div>
	<p>1234567</p>
	<p>8912345</p>
	<p>6789012</p>
</div>
<script type="text/javascript">
	let div = document.getElementsByTagName('div')[0]
	let p = document.createElement('p')
	p.innerText='正太来到烤鸭店'
	//replaceChild('要替换的新内容'，'要替换的旧内容') 调用者父元素
	div.replaceChild(p,div.children[1])
</script>
</body>
</html>